package com.touchfired.common.exception;

/**
 * @Description 错误码
 * @Author 幸佳俊
 */
public enum ErrorCode {
    SUCCESS(200, "操作成功"),
    ERROR_400(400, "非法请求"),
    ERROR_404(404, "资源不存在"),
    ERROR_500(500, "系统内部错误"),

    /** 连接异常 */
    CONNECTED_ADD_CLIENT_INFO_ERROR(100001, "客户端连接参数缺失"),

    /** 客户端异常 */
    CLIENT_NULL_ERROR(100101, "客户端通道不存在"),

    /** 房间异常 */
    ROOM_NULL_ERROR(100201, "房间不存在"),
    ROOM_CREATE_PARAMS_NULL_ERROR(100202, "创建房间信息参数缺失"),




    ERROR_OPTIONS_VALUE(10000, "错误的选择类型"),
    ERROR_OPTIONS_INPUT_VALUE(10001, "错误的输入结果"),
    ROOM_SETTINGS_PLAYER_NULL(10002, "玩家人数输入错误"),
    ROOM_SETTINGS_SPYER_NULL(10003, "卧底人数输入错误"),
    ROOM_JOIN_ID_NULL(10004, "暂无该房间号"),
    CLIENT_NULL(10005, "用户不存在")
    ;

    private int code;
    private String desc;

    public String getDesc() {
        return desc;
    }

    public int getCode() {
        return code;
    }

    ErrorCode (int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
